import 'package:common_utils/common_utils.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:xinxuan/http/http_util_service.dart';

class UpgradesPageController extends GetxController {
  
  /// 申请内容
  var reason = ''.obs;

  /// 提交会员申请
  submitUpgrades() async {
    if (TextUtil.isEmpty(reason.value)) {
      EasyLoading.showToast('请输入申请内容');
      return;
    }
    var res = await HttpUtilService.submitUpgrades(reason: reason.value);
    if (res) {
      Get.back();
      EasyLoading.showToast('提交成功');
    }
  }

}